<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

       .container{
            display: flex;
            width: 700px;
            height: 300px;
            margin: 5px auto;
            justify-content: space-around;
            align-items: flex-end;
            text-align: center;
            border-left: 1px solid rgb(139, 133, 133);
            border-bottom: 1px solid rgb(139, 133, 133);
            border-top: none;
            border-right: none;
       }
       .container>div{
            display: flex;
            width: 50px;
            flex-direction: column;
            border: 1px solid rgb(139, 133, 133);
            background-color: pink;
            justify-content: space-between;
              transition: height 0.3s ease;
       }
       .container div span {
            margin-top: -20px;
       }
       .container div h4{
            margin-bottom: -35px;
            width: 70px;
            margin-left: -10px;
       }

    </style>
</head>
<body>

    <script>
        let arr=[]
        for (let i=1;i<5;i++){
            arr.push(prompt(`请输入第${i}季度的营业额`))
        }
        document.write(`<div class="container">`)
            for (let i=0;i<4;i++){
                document.write(`
                <div class="first" style="height: ${arr[i]}px;">
                    <span>${arr[i]}</span>
                    <h4>第${i+1}季度</h4>
        </div>`)
            }
        document.write(`</div>`)
        console.log(arr)
    </script>
</body>
</html>